<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>栏目列表</title>
	<hdjs/>
</head>
<body>
	<div class='wrap hd-form'>
		<div class='menu_list'>
			<ul>
				<li>
					<a href="{|U:'add'}">添加栏目</a>
				</li>
				<li>
					<a href="{|U:'update'}">更新缓存</a>
				</li>
				<li style="margin-bottom:10px;">
					<select>
						<option value="0">==选择顶级栏目==</option>
						<list from="$cat" name="$c">
							<if value="{$c.pid} eq 0">
							<option value="{$c.cid}" <if value="{$c.cid} eq {$hd.get.cid}">selected=""</if>>{$c._name}</option>
							</if>
						</list>
					</select>
				</li>
			</ul>
		</div>
		<div>
			<table class='table2'>
				<thead>
					<tr>
						<td class='w50'>CID</td>
						<td>名称</td>
						<td>显示</td>
						<td class='w200'>操作</td>
					</tr>
				</thead>
				<tbody>
					<list from="$category" name="$c">
						<tr>
							<td>{$c.cid}</td>
							<td>{$c._name}</td>
							<td>{$c.is_show_text}</td>
							<td>
								<a href="{|U:'edit',array('cid'=>$c['cid'])}">编辑</a> |
								<a href="{|U:'add',array('cid'=>$c['cid'])}">添加子栏目</a> |
								<a href="{|U:'del',array('cid'=>$c['cid'])}" onclick="return confirm('确定删除该栏目及其子栏目吗？')">删除</a>
							</td>
						</tr>
					</list>
				</tbody>
			</table>
		</div>
	</div>
	<css file="__CONTROLLER_VIEW__/css/index.css" />
	<js file="__CONTROLLER_VIEW__/js/index.js"/>
</body>
</html>